<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>DEMO index</title>

<script src="/assets/js/jquery.js"></script>
<script src="/assets/js/jquery.myui.core.js"></script>
	
</head>
<body>
<div>
<input type="radio" value="1" name="radio_name"  />1
<input type="radio" value="2"  name="radio_name" />2
<input type="radio" value="3"  name="radio_name" />3

<input type="checkbox" value="1" name="check_name" />保密

<button id="btn_radio">TEST</button>

</div>

<form>
<p>
<input type="checkbox" name="newsletter" value="Hourly" checked="checked">
<input type="checkbox" name="newsletter" value="Daily">
<input type="checkbox" name="newsletter" value="Weekly">
<input type="checkbox" name="newsletter" value="Monthly" checked>
<input type="checkbox" name="newsletter" value="Yearly">
</p>
</form>
<div id="msg"></div>


	<script type="text/javascript">
		$(document).ready(function() {
			$('#btn_radio').bind('click',function(){
				 
				$.myui.log("checkbox value=" + $("input[name='radio_name']:checked").val());
				$.myui.log("checkbox value=" + $("input[name='check_name']:checked").val());
			});
			
			var countChecked = function() {
				var n = $( "input:checked" ).length;
					$( "#msg" ).text( n + (n === 1 ? " is" : " are") + " checked!" );
			};
			countChecked();
			$( "input[type=checkbox]" ).on( "click", countChecked );
		});
	</script>
</body>
</html>